<?php
/**
 * 	Portal
 *
 * @category   Portal
 * @package    Portal
 * @copyright  Copyright (c) 2009 Nathan Keyes
 * @author $Author: nkeyes $
 * @version    $Id: File.php 54 2009-11-15 17:43:10Z nkeyes $
 */
 
class Bushido_DbTable_File extends Bushido_Db_Table_Abstract
{
	protected $_name = 'file';
	protected $_niceName = 'File';
	protected $_sequence = true;
	
	protected $_referenceMap = array
	(
	);
	
	
	
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/Table/Bushido_Table_Abstract#getSearchableFields()
	 */
	public function getSearchableFields()
	{
	}
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/Db/Table/Bushido_Db_Table_Abstract#_setFieldDetails()
	 */
	protected function _setFieldDetails()
	{
		//filename
		$this->_metadata['filename']['fieldDetails'] = array
		(
			'type' => 'generated'
		);
		
		//size
		$this->_metadata['size']['fieldDetails'] = array
		(
			'type' => 'generated'
		);
		
		//mime_type
		$this->_metadata['mime_type']['fieldDetails'] = array
		(
			'type' => 'generated'
		);
		
		//content
		$this->_metadata['content']['fieldDetails'] = array
		(
			'type' => 'File',
			'options' => array
			(
				'label' => 'File:'
			) 
		);
		
		//task_id
		$this->_metadata['task_id']['fieldDetails'] = array
		(
			'type' => 'generated'
		);
		
		//task_update_id
		$this->_metadata['task_update_id']['fieldDetails'] = array
		(
			'type' => 'generated'
		);
	}
	
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/Table/Bushido_Table_Abstract#getDisplayValue()
	 */
	public static function getDisplayValue(Zend_Db_Table_Row_Abstract $row, $context = null)
	{
		return $row->filename;
	}
}